import { createWebHistory, createRouter } from 'vue-router'


const routes = [
    {
      path: '/',
      name: 'Home',
      component: () => import('../views/Home.vue')
    },
    // 重定向到首页
    {
      path: '/home',
      redirect: '/'
    },
    // 文章列表页
    {
      path: '/article',
      name: 'Article',
      component: () => import('../views/ArticleList.vue')
    },
    // 文章详情页
    {
      path: '/articleDetail/:id',
      name: 'ArticleDetail',
      component: () => import('../views/ArticleDetail.vue')
    },
    // 关于我
    {
      path: '/about',
      name: 'About',
      component: () => import('../views/About.vue')
    },
    // 音乐
    {
      path: '/music',
      name: 'Music',
      component: () => import('../views/Music.vue')
    },
    {
      path:'/user',
      name:'user',
      component: () => import('../views/User.vue')
    }

  
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})
export default router